package org.phantom.securityframework.api.domain;

import java.util.List;

import org.phantom.securityframework.api.util.AuthUtil;
/**
 * 帐号查询对象
 * @author david
 *
 */
public class AccountQuery extends Query implements MysqlQuerySupport{

	private String accountId;
	@SuppressWarnings("unused")
	private String platformId;
	private Integer status;
	private Integer roleId;
	private Integer groupId;
	private String beginCreateDate;
	private String endCreateDate;
	private String beginModifyDate;
	private String endModifyDate;
	private String beginLastLoginDate;
	private String endLastLoginDate;
	
	
	
	private List<? extends org.phantom.securityframework.api.AccountExt> AccountExts ;

	private Integer limit;
	private Integer offset;
	
	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public String getPlatformId() {
		return AuthUtil.getPlatformId();
	}


	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public Integer getGroupId() {
		return groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	public List<? extends org.phantom.securityframework.api.AccountExt> getAccountExts() {
		return AccountExts;
	}

	public void setAccountExts(List<? extends org.phantom.securityframework.api.AccountExt> accountExts) {
		AccountExts = accountExts;
	}

	public Integer getLimit() {
		if(this.getPage()==null || this.getRows()==null)return null;
		int start = (this.getPage() - 1) * this.getRows();
		int end = this.getPage() * this.getRows();
		limit = end-start;
		return limit;
	}

	public Integer getOffset() {
		if(this.getPage()==null || this.getRows()==null)return null;
		offset = (this.getPage() - 1) * this.getRows();
		return offset;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getBeginCreateDate() {
		return beginCreateDate;
	}

	public void setBeginCreateDate(String beginCreateDate) {
		this.beginCreateDate = beginCreateDate;
	}

	public String getEndCreateDate() {
		return endCreateDate;
	}

	public void setEndCreateDate(String endCreateDate) {
		this.endCreateDate = endCreateDate;
	}

	public String getBeginModifyDate() {
		return beginModifyDate;
	}

	public void setBeginModifyDate(String beginModifyDate) {
		this.beginModifyDate = beginModifyDate;
	}

	public String getEndModifyDate() {
		return endModifyDate;
	}

	public void setEndModifyDate(String endModifyDate) {
		this.endModifyDate = endModifyDate;
	}

	public String getBeginLastLoginDate() {
		return beginLastLoginDate;
	}

	public void setBeginLastLoginDate(String beginLastLoginDate) {
		this.beginLastLoginDate = beginLastLoginDate;
	}

	public String getEndLastLoginDate() {
		return endLastLoginDate;
	}

	public void setEndLastLoginDate(String endLastLoginDate) {
		this.endLastLoginDate = endLastLoginDate;
	}
}

